﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SyncLib.Data;
using Microsoft.Synchronization.Data;
using Microsoft.Synchronization;

namespace SyncLib
{

    public class SyncContext
    {
        public ScopeInfoEx CurrentScope { get; set; }
        public TableOfScope CurrentTable { get; set; }
        public DependencyTable CurrentDepen { get; set; }
        public SyncProviderPosition Position { get; set; }
        public string RunMode { get; set; }
        public string GetCurrentInfo()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("SyncContext: ");
            sb.AppendFormat("CurrentScope={0}", CurrentScope.ScopeName);
            sb.AppendFormat(" CurrentTable={0}", CurrentTable == null ? "NULL" : CurrentTable.TableName);
            sb.AppendFormat(" CurrentDepen={0}", CurrentDepen == null ? "NULL" : CurrentDepen.TableName);
            sb.AppendFormat(" Provider Position={0}", Position);
            return sb.ToString();
        }
    }

}
